import request from '@/utils/request'


export default {
    //文章列表 条件查询带分页
    //POST /eduservice/article/pageArticleCondition/{current}/{limit}
    getArticleListPage(current,limit,articleQuery){
        return request({
            url: `/eduservice/article/pageArticleCondition/${current}/${limit}`,
            method: 'post',
            data:articleQuery
          })
    },
    //根据id删除文章
    //DELETE /eduservice/article/{id}
    removeById(id) {
        return request({
        url: `/eduservice/article/${id}`,
        method: 'delete'
         })
    },
    //POST /eduservice/article/addArticle
    //添加文章
    addArticle(article){
        return request({
            url: `/eduservice/article/addArticle`,
            method: 'post',
            data:article
        })
    },
    //id查询文章数据回显
    //GET /eduservice/article/getArticle/{id}
    getArticleInfo(id){
        return request({
            url: `/eduservice/article/getArticle/${id}`,
            method: 'get'          
        })
    },
    //POST /eduservice/article/updateArticle
    //修改文章
    updateArticleInfo(article){
        return request({
            url: `/eduservice/article/updateArticle`,
            method: 'post',
            data:article          
        }) 
    }
}